package com.lihao.wanandroid.app.util

import android.content.Context
import android.content.LocusId
import android.content.res.ColorStateList

/**
 * Created by lihao on 2020/5/15.
 * Describe:
 */
object SettingUtil {

    fun getColor(context: Context, resId: Int): Int {
        return context.resources.getColor(resId)
    }

    fun getOneColorStateList(color: Int): ColorStateList {
        val colors = intArrayOf(color)
        val states = arrayOfNulls<IntArray>(1)
        states[0] = intArrayOf()
        return ColorStateList(states, colors)
    }

}